package com.linln.modules.integralmall.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.linln.common.vo.JsonResult;
import com.linln.modules.integralmall.domain.IntegralMallService;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * @author : pengliang
 * @version V1.0
 * @Project: timo
 * @Package com.linln.integralmall.service
 * @Descriptio /**
 * @Project: timo
 * @Package com.linln.integralmall.service
 * @Description: TODO
 * @date Date : 2020年12月14日 15:41
 */
public interface IntegralMallServiceService extends IService<IntegralMallService> {

    //获取积分商城服务
    Map<String, Object> getIntegralMallService(Integer pageNum, Integer limit, String serviceName);

    //添加服务
    boolean addIntegralMallService(List<MultipartFile> files, IntegralMallService service);

    //更新服务
    boolean updateIntegralMallService(List<MultipartFile> files, List<Integer> status, IntegralMallService service);

    //删除服务
    boolean delIntegralMallService(String serviceId);

    //获取积分商城服务
    Map<String, Object> getIntegralMallList(Integer pageNum, Integer limit, String serviceTypeId, Integer integral, String integralMallServiceName);

    //获取商城服务详细信息
    Map<String, Object> getIntegralMallServiceInfo(String serviceId);

    //购买服务
    JsonResult buyIntegralService(String serviceId, long userId) throws Exception;

    //生成待支付订单
    JsonResult closeIntegralService(String serviceId, long userId);

    //支付待支付订单
    JsonResult payIntegralService(String orderId, long userId) throws Exception;

    //活动券是否被积分商城服务关联
    boolean activityServiceIsItAssociatedByIntegralMall(String activityServiceId);

    //通过商城服务id 获取服务详情
    IntegralMallService getIntegralMallServiceById(String imsId);
}
